package com.wty.basic.equalshashcode;

/**
 * @Author wangtengyu
 * @Create 2018-08-03-9:59
 */
public class Test1 {
    public static void main(String[] args) {
        Student stu1=new Student("zhangsan",15);
        Student stu2=new Student("zhangsan",15);

        //不重写equals的情况下 Object中的equals等同于== 比较的是地址值
        System.out.println(stu1.equals(stu2));
        System.out.println("stu1 hashcode  "+stu1.hashCode());
        System.out.println("stu2 hashcode  "+stu2.hashCode() );
    }
}
